<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}
li{
    list-style: none;
}
ul{
    position: relative;
}
.box{
    margin: 100px auto;
    width: 400px;
}
.box ul{
    display: flex;
    justify-content: space-around;
}
li:hover .box1{
    opacity: 1;
    height: 200px;
}
.box1{
    width: 400px;
    overflow: hidden;
    font-size: 30px;
    line-height: 200px;
    background-color: blue;
    position: absolute;
    left: 0;
    top: 21px;
    font-weight: 900;
    height: 0;
    opacity: 0;
    transition: all .3s linear;
}
</style>
<body>
    <div class="box">
        <ul>
            <li style="width: 40px;background-color: blue;text-align: center;">1
                <div class="box1">
                    蓝
                </div>
            </li>
            <li style="width: 40px;background-color: red;text-align: center;">2
                <div class="box1" style="background-color: red;">
                    红
                </div>
            </li>
            <li style="width: 40px;background-color: orange;text-align: center;">3
                <div class="box1" style="background-color: orange;">
                    黄
                </div>
            </li>
        </ul>
    </div>
    
</body>
</html>